package com.qd.panda.model;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 商品分类列表
 *
 * @author sjk
 */
@Getter
@Setter
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@TableName("panda_commodity_classification_list")
public class CommodityClassificationList extends Model<CommodityClassificationList> implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(value = "commodity_classification_id", type = IdType.NONE)
    private String commodityClassificationId;
    /**
     * 排序
     */
    @TableField("idx")
    private Integer idx;
    /**
     * 添加时间
     */
    @TableField("add_time")
    private LocalDateTime addTime;
    /**
     * 修改时间
     */
    @TableField("update_time")
    private LocalDateTime updateTime;
    /**
     * 删除时间
     */
    @TableField(value = "delete_time",fill = FieldFill.UPDATE)
    private LocalDateTime deleteTime;
    /**
     * 是否删除
     */
    @TableLogic
    @TableField("is_deleted")
    private Integer isDeleted;
    /**
     * 商品ID
     */
    @TableField("commodity_id")
    private String commodityId;
    /**
     * 分类编码
     */
    @TableField("classification_code")
    private String classificationCode;
    /**
     * 操作人
     */
    @TableField(updateStrategy = FieldStrategy.ALWAYS, value = "operator")
    private String operator;
    /**
     * 机构ID
     */
    @TableField(updateStrategy = FieldStrategy.ALWAYS, value = "org_id")
    private String orgId;

    public void freeData() {
        this.commodityClassificationId = null;
        this.idx = null;
        this.addTime = null;
        this.updateTime = null;
        this.deleteTime = null;
        this.isDeleted = null;
        this.commodityId = null;
        this.classificationCode = null;
        this.operator = null;
        this.orgId = null;
    }

}
